const { series, src, dest } = require('gulp');
const rename = require('gulp-rename');
const sass = require('gulp-sass');
const sassGlob = require('gulp-sass-glob');
// const postcss = require('gulp-postcss');
// const removeGlobal = require('postcss-remove-global');
function compileScss() {
    return (
        src([
            'zerod/scss/common/z-margin-padding.scss',
            'zerod/scss/common/z-flex.scss',
            'zerod/scss/common/z-font-size.scss',
            'zerod/scss/common/z-text-align.scss',
            'zerod/scss/common/z-visible.scss',
            'zerod/scss/common/z-text-indent.scss',
            'zerod/scss/common/z-float.scss'
        ])
            .pipe(sassGlob())
            .pipe(sass())
            // .pipe(postcss([removeGlobal]))
            .pipe(rename({ extname: '.g.scss' }))
            .pipe(
                dest(function({ base }) {
                    return base;
                })
            )
    );
}

exports.default = series([compileScss]);
